<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../include/laypublic.jsp" %>
<%@ include file="../include/vueComponent.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>立项审批</title>
</head>
<style>
    #app {
        width: 100%;
        height: 100%;
        padding: 60px 20px 20px;
        box-sizing: border-box;
    }

    .head {
        position: fixed;
        top: 0;
        left: 20px;
        height: 50px;
        background: rgb(242, 242, 242);
        z-index: 99;
        width: calc(100% - 40px);
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    .head .left {
        border-bottom: 5px solid #2f9688;
        font-size: 17px;
        padding-bottom: 5px;
    }

    .container {
        width: 100%;
        background: white;
        padding: 10px;
        box-sizing: border-box;
    }

    .full {
        width: 100%;
    }

    /*改变el-form-item的样式*/
    .el-form-item {
        margin-bottom: 4px;
    }

    .flex-center {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mr-10 {
        margin-right: 10px;
    }

    .title {
        border-bottom: 1px solid #2f9688;
        margin-bottom: 30px;
    }

    h3 {
        background: #2f9688;
        display: inline-block;
        color: white;
        padding: 5px 10px;
        border-radius: 4px 4px 0 0;
        font-size: 14px;
    }

    .el-form-item__label {
        height: 40px;
        line-height: 20px;
        display: flex;
        align-items: center;
    }

    .unit {
        width: calc(100% - 14.4% - 40px);
        margin: 0 8.33333% 0 calc(8.33333% - 40px);
        padding: 0 0 30px 0;
    }

    .unit .unit_center {
        display: flex;
        justify-content: flex-start;
    }

    .unit .unit_add {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 10px;
    }

    .unit .unit_img {
        padding-top: 47.4px;
        width: 30px;
        margin-right: 10px;
    }

    .unit .unit_img div {
        line-height: 41px;

    }

    .unit .el-table thead {
        color: black !important;
        font-weight: normal !important;

    }

    .unit .el-table td {
        padding: 0 !important;
    }

    .unit .el-table__row > .td {
        padding: 0 !important;
    }

    .unit .el-table .el-input__inner {
        border: none;
        background-color: rgba(0, 0, 0, 0);
        text-align: center;
    }

    .investment {
        width: calc(100% - 14.4% - 40px);
        margin: 0 8.33333% 0 calc(8.33333% - 40px);
        padding: 0 0 30px 0;
    }

    .investment .investment_center {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .investment_top_del {
        margin: 0 0 10px 40px;
        width: calc(100% - 140px);
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .investment_top_del .item {
        flex: 1;
        text-align: center;
    }

    .investment .investment_add {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 10px;
    }

    .investment .investment_img {
        padding-top: 64px;
        width: 30px;
        margin-right: 10px;
    }

    .investment .investment_img div {
        height: 41px;
        line-height: 41px;

    }

    .investment .el-table thead {
        color: black !important;
        font-weight: normal !important;

    }

    .investment .el-table td {
        padding: 0 !important;
    }

    .investment .el-table__row > .td {
        padding: 0 !important;
    }

    .investment .el-table .el-input__inner {
        border: none;
        background-color: rgba(0, 0, 0, 0);
        text-align: center;
    }

    .el-input.is-disabled .el-input__inner {
        color: #000;
    }

    .popover_item {
        padding: 0 10px;
    }

    .popover_item .el-button:active {
        color: #2f9688
    }

    .el-button:focus, .el-button:hover {
        color: #fff;
        border-color: #2f9688;
        background-color: #2f9688;
    }

    .layui-form-label {
        width: 180px;
    }
</style>
<body>
<div id="app">
    <div class="head">
        <div class="left">立项详情</div>
        <div class="right">
            <button type="button" class="layui-btn layui-btn-primary layui-btn-radius" @click="save(0)">驳回</button>
            <button type="button" class="layui-btn layui-btn-radius" @click="save(1)">通过</button>
        </div>
    </div>
    <div class="container">
        <el-form ref="formRef" :model="info" label-width="140px" label-suffix="："
                 label-position="left">
            <%--项目基础信息--%>
            <div class="base-info">
                <div class="title">
                    <h3>项目基础信息</h3>
                </div>
                <!--表单-->
                <div>
                    <el-row>
                        <x-col>
                            <el-form-item label="项目名称">
                                <span>{{info.proName}}</span>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="项目编码">
                                <span>{{info.proCode}}</span>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="营销经理">
                                <span>{{info.staffName}}</span>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="申请日期">
                                <span>{{info.dates}}</span>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="所属公司">
                                <span>{{info.compName}}</span>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="项目业态">
                                <span>{{info.proFormat}}</span>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="项目地点">
                                <span>{{info.sgCityName}}</span>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="一般公共预算收入">
                                <span>{{info.pubIncome}}</span>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="入库情况">
                                <x-select v-model="info.isInStore" :options="storageSituation" name="入库类型"></x-select>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="年度全部PPP项目已占一般公共预算支出比例" label-width="200px">
                                <span>{{info.pppPercent}}</span>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="运营周期">
                                <x-input v-model="info.omYears" name="运营周期"/>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="建设周期">
                                <x-input v-model="info.buildYears" name="建设周期"></x-input>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="合作周期">
                                <x-input v-model="info.workYears" name="合作周期"></x-input>
                            </el-form-item>
                        </x-col>

                        <x-col position="right">
                            <el-form-item label="总投资额">
                                <x-input v-model="info.sumAmount" name="总投资额"></x-input>
                            </el-form-item>
                        </x-col>
                    </el-row>
                    <el-row>
                        <x-col>
                            <el-form-item label="项目渠道">
                                <x-select v-model="info.fromChannel" :options="projectChannel" name="项目渠道"></x-select>
                            </el-form-item>
                        </x-col>
                        <x-col position="right">
                            <el-form-item label="政府评审阶段">
                                <x-input v-model="info.govAccess" name="政府评审阶段"></x-input>
                            </el-form-item>
                        </x-col>

                    </el-row>
                    <el-row>
                        <x-col position="full">
                            <el-form-item label="项目简介">
                                <x-input v-model="info.proRemarks" name="项目简介" type="textarea" :rows="4"></x-input>
                            </el-form-item>
                        </x-col>
                    </el-row>
                </div>
            </div>
            <%--项目合作方--%>
            <div class="title">
                <h3>项目合作方</h3>
            </div>
            <div class="unit">
                <div class="unit_add">
                    <button class="layui-btn layuiadmin-btn-admin" type="button" data-type="add"
                            @click="addSummaryCoops">
                        <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加合作单位
                    </button>
                </div>
                <div class="unit_center">
                    <div class="unit_img">
                        <div class="item" v-for="(item,index) in summaryCoops" :key="index"
                             v-if="summaryCoops.length>1">
                            <img src="${ctx}/resources/images/del.png" alt="" @click="delSummaryCoops(index)">
                        </div>
                    </div>
                    <el-table :data="summaryCoops" style="width: 100%" border>
                        <el-table-column label="合作单位" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.sgCoopId" filterable placeholder="请选择">
                                    <el-option v-for="item in coopInfoList" :key="item.id" :label="item.coopName"
                                               :value="item.id"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column label="单位作用" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.coopEffect" placeholder="请选择">
                                    <el-option v-for="item in unitRole" :key="item.code" :label="item.name"
                                               :value="item.code"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column label="合作类型" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.cooperationType" placeholder="请选择">
                                    <el-option v-for="item in cooperationType" :key="item.code" :label="item.name"
                                               :value="item.code"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <div class="title">
                <h3>项目投资构成</h3>
            </div>
            <div class="investment">
                <div class="investment_add">
                    <button class="layui-btn layuiadmin-btn-admin" type="button" @click.stop="addInvestment">
                        <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加子项
                    </button>
                </div>
                <div class="investment_top_del" v-if="itemName.length>1">
                    <div class="item"></div>
                    <div class="item" v-for="(item,index) in itemName" :key="index">
                        <img src="${ctx}/resources/images/del.png" alt="" @click="delInvestmentTop(index)">
                    </div>
                </div>
                <div class="investment_center">
                    <div class="investment_img">
                        <div class="item" v-for="(item,index) in investmentData" :key="index">
                            <img src="${ctx}/resources/images/del.png" alt="" @click="delInvestmentLeft(index)"
                                 v-if="item.isAdd">
                        </div>
                    </div>
                    <el-table :data="investmentData" style="width: 100%" border ref="investment">
                        <el-table-column prop="name" label="名称" align="center">
                            <template slot-scope="scope">
                                <div v-if="scope.$index<=2||scope.row.name=='合计'">{{scope.row.name}}</div>
                                <div v-else>
                                    <%--                                hover--%>
                                    <el-popover placement="bottom" width="50" trigger="hover" style="opacity: 0">
                                        <div class="el-popover_item">
                                            <el-button type="button">添加费用</el-button>
                                        </div>
                                        <div class="el-popover_item">
                                            <el-button type="button" @click="addInvestmentList(scope.row)">添加子项
                                            </el-button>
                                        </div>
                                        <div slot="reference">
                                            <div style="cursor: pointer" v-if="!scope.row.isAdd">
                                                {{scope.row.name}}
                                            </div>
                                            <el-input v-else v-model="scope.row.name" placeholder="请选择费用"></el-input>
                                        </div>
                                    </el-popover>
                                </div>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" v-for="(item,index) in itemName "
                                         :key="index">
                            <template #header>
                                <el-input v-model="item.name" placeholder="请输入子项"></el-input>
                            </template>
                            <template slot-scope="scope">
                                <template v-if="scope.row.name=='合计'">
                                    <el-input v-model="scope.row.list[index]" type="number" min="0" placeholder="请输入金额"
                                              @input="investmentTotal" :disabled="true" style="color: #000"></el-input>
                                </template>
                                <template v-else>
                                    <el-input v-model="scope.row.list[index]" type="number" min="0" placeholder="请输入金额"
                                              @input="investmentTotal"></el-input>
                                </template>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="合计" align="center" type="index" width="100">
                            <template slot-scope="scope">
                                <div v-if="scope.$index<=2"></div>
                                <div v-else>{{scope.row.total?scope.row.total:'0'}}</div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <%--回报机制--%>
            <div class="repay">
                <div class="title">
                    <h3>回报机制</h3>
                </div>
                <el-row>
                    <x-col position="full">
                        <el-form-item>
                            <el-radio-group v-model="info.backMech">
                                <el-radio label="1">政府付费</el-radio>
                                <el-radio label="2">可行性缺口补助</el-radio>
                                <el-radio label="3">使用者付费</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </x-col>
                </el-row>
                <el-row>
                    <el-col :span="6" :offset="2" class="mr-10">
                        <el-form-item label="工程费用下浮率">
                            <x-input size="small" type="number" min="0" v-model="info.downRate"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="合理利润率">
                            <x-input size="small" type="number" min="0" v-model="info.profitRate"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="投资回报率">
                            <x-input size="small" type="number" min="0" v-model="info.investBackRate"/>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6" :offset="2" class="mr-10">
                        <el-form-item label="折现率">
                            <x-input size="small" type="number" min="0" v-model="info.discountRate"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="建设期融资利率">
                            <x-input size="small" type="number" min="0" v-model="info.finRate"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="融资回报率">
                            <x-input size="small" type="number" min="0" v-model="info.finBackRate"/>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6" :offset="2" class="mr-10">
                        <el-form-item label="资本金回报率">
                            <x-input size="small" type="number" min="0" v-model="info.capitalBackRate"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="总投资额">
                            <x-input size="small" type="number" min="0" v-model="info.sumAmount"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="资本金比例">
                            <x-input size="small" type="number" min="0" v-model="info.capitalPercent"/>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6" :offset="2" class="mr-10">
                        <el-form-item label="资本金数额">
                            <x-input size="small" type="number" min="0" v-model="info.capitalFund"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="我方股权出资金额">
                            <x-input size="small" type="number" min="0" v-model="info.stockFund"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" class="mr-10">
                        <el-form-item label="我方股权比例">
                            <x-input size="small" type="number" min="0" v-model="info.stockPercent"/>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>
            <div class="title">
                <h3>项目风险信息</h3>
            </div>
            <div class="unit">
                <div class="unit_add">
                    <button class="layui-btn layuiadmin-btn-admin" type="button" data-type="add" @click="addRiskTable">
                        <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加风险点
                    </button>
                </div>
                <div class="unit_center">
                    <div class="unit_img">
                        <div class="item" v-for="(item,index) in riskTable" :key="index" v-if="riskTable.length>1">
                            <img src="${ctx}/resources/images/del.png" alt="" @click="delRiskTable(index)">
                        </div>
                    </div>
                    <el-table :data="riskTable" style="width: 100%" border>
                        <el-table-column prop="unit" label="风险描述" align="center">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.riskDesc" placeholder="请输入风险点"></el-input>
                            </template>
                        </el-table-column>
                        <el-table-column prop="effect" label="风险等级" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.riskLevel" placeholder="请选择">
                                    <el-option v-for="item in riskLevel" :key="item.code" :label="item.name"
                                               :value="item.code"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="处理策略" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.solveWay" placeholder="请选择">
                                    <el-option v-for="item in riskSolveWay" :key="item.code" :label="item.name"
                                               :value="item.code"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="状态" align="center">
                            <template slot-scope="scope">
                                <el-select v-model="scope.row.status" placeholder="请选择">
                                    <el-option v-for="item in riskStatus" :key="item.code" :label="item.name"
                                               :value="item.code"></el-option>
                                </el-select>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="最新进展" align="center">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.latestProgress" placeholder="请描述风险进展"></el-input>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <div class="title">
                <h3>底线标准情况</h3>
            </div>
            <div class="unit">
                <div class="unit_center">
                    <el-table :data="standardTable" style="width: 100%" border>
                        <el-table-column prop="unit" label="标准名称" align="center">
                            <template slot-scope="scope">
                                {{scope.row.name}}
                            </template>
                        </el-table-column>
                        <el-table-column label="标准值" align="center">
                            <template slot-scope="scope">
                                {{scope.row.schedule}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="当前进度" align="center">
                            <template slot-scope="scope">
                                {{scope.row.value}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="结论" align="center">
                            <template slot-scope="scope">
                                {{scope.row.conclusion}}
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <div class="title">
                <h3>立项策划信息</h3>
            </div>
            <el-row>
                <x-col position="full">
                    <el-form-item label="优化方案">
                        <x-input v-model="plotInfo.optRemark" type="textarea" :rows="4"></x-input>
                    </el-form-item>
                </x-col>
            </el-row>
            <div class="unit" style="padding-top: 10px">
                <div class="unit_add">
                    <button class="layui-btn layuiadmin-btn-admin" type="button" data-type="add" @click="addPlotInfo">
                        <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加其他测算边界条件
                    </button>
                </div>
                <div class="unit_center">
                    <div class="unit_img">
                        <div class="item" v-for="(item,index) in plotInfo.plotTableDatas" :key="index"
                             v-if="plotInfo.plotTableDatas.length>1">
                            <img src="${ctx}/resources/images/del.png" alt="" @click="delPlotInfo(index)">
                        </div>
                    </div>
                    <el-table :data="plotInfo.plotTableDatas" style="width: 100%" border>
                        <el-table-column prop="effect" label="测算边界" align="center">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.csBound" placeholder="请输入测算边界"></el-input>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="目前指标" align="center">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.nowIndex" placeholder="请输入目前指标"></el-input>
                            </template>
                        </el-table-column>
                        <el-table-column prop="type" label="优化情况" align="center">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.optimization" placeholder="请描述优化情况"></el-input>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <el-row>
                <x-col position="full">
                    <el-form-item label="初步测算结果">
                        <x-input v-model="plotInfo.csResult" type="textarea" :rows="4"></x-input>
                    </el-form-item>
                </x-col>
            </el-row>
            <div class="title">
                <h3>项目附件信息</h3>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="width:350px;">支持pdf、excel、word、图片资料，可上传多个</label>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">立项报告</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn" type="button" id="4-upload-more">上传</button>
                        <div class="layui-upload-list" id="4-upload-more-list">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">营销策划书（选填）</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn" type="button" id="5-upload-more">上传</button>
                        <div class="layui-upload-list" id="5-upload-more-list">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目物有所值评估</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn" type="button" id="6-upload-more">上传</button>
                        <div class="layui-upload-list" id="6-upload-more-list">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目财政承受可行性评估</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn" type="button" id="7-upload-more">上传</button>
                        <div class="layui-upload-list" id="7-upload-more-list">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目实施方案</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="layui-btn" type="button" id="8-upload-more">上传</button>
                        <div class="layui-upload-list" id="8-upload-more-list">
                        </div>
                    </div>
                </div>
            </div>

            <%--审批信息--%>
            <div class="title">
                <h3>审批信息</h3>
            </div>
            <div class="approve">
                <el-row>
                    <x-col position="left">
                        <el-form-item label="是否继续跟踪">
                            <x-select v-model="info.isTrack" name="继续跟踪" :options="traceOptions"></x-select>
                        </el-form-item>
                    </x-col>
                    <x-col position="full">
                        <el-form-item label="审批意见">
                            <x-input v-model="auditMsg" type="textarea" :rows="4"></x-input>
                        </el-form-item>
                    </x-col>
                </el-row>
            </div>
        </el-form>
    </div>
</div>
<script src="${ctx}/resources/vue-element-lib/jquery.js"></script>
<script>
    var fileArr = [];

    <%--var id = "${id}";--%>
    <%--alert(id);--%>
    var staticPath = '${fileHttpPre}';
    layui.config({
        base: '${ctx}/resources/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'set', 'upload'], function () {
        var $ = layui.$, upload = layui.upload;

        //多文件列表示例
        upload.render({
            elem: '#4-upload-more',
            url: basePath + '/contractInfo/uploadAtt/',
            data: {
                types: 4
            },
            multiple: true,
            accept: 'file',
            acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
            before: function (obj) { //obj参数包含的信息
                layer.load(); //上传loading
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.closeAll('loading'); //关闭loading
                    return layer.msg(res.msg, {icon: 7});
                }
                //上传完毕
                if (res.entity != null && res.entity.length > 0) {
                    fileArr.push(res.entity[0])
                    for (var i in res.entity) {
                        var contractInfo = res.entity[i];
                        var arr = contractInfo.split("|");
                        var imgSrc = "";
                        var suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#4-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            }
            ,
            allDone: function (obj) { //当文件全部被提交后，才触发
                layer.closeAll('loading'); //关闭loading
            },
            error: function () {
                layer.closeAll('loading'); //关闭loading
                //上传失败
                layer.msg("上传失败，请稍后再试~", {icon: 7});
            }
        });
        upload.render({
            elem: '#5-upload-more',
            url: basePath + '/contractInfo/uploadAtt/',
            data: {
                types: 5
            },
            multiple: true,
            accept: 'file',
            acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
            before: function (obj) { //obj参数包含的信息
                layer.load(); //上传loading
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.closeAll('loading'); //关闭loading
                    return layer.msg(res.msg, {icon: 7});
                }
                //上传完毕
                if (res.entity != null && res.entity.length > 0) {
                    fileArr.push(res.entity[0])
                    for (var i in res.entity) {
                        var contractInfo = res.entity[i];
                        var arr = contractInfo.split("|");
                        var imgSrc = "";
                        var suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#5-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            }
            ,
            allDone: function (obj) { //当文件全部被提交后，才触发
                layer.closeAll('loading'); //关闭loading
            },
            error: function () {
                layer.closeAll('loading'); //关闭loading
                //上传失败
                layer.msg("上传失败，请稍后再试~", {icon: 7});
            }
        });
        upload.render({
            elem: '#6-upload-more',
            url: basePath + '/contractInfo/uploadAtt/',
            data: {
                types: 6
            },
            multiple: true,
            accept: 'file',
            acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
            before: function (obj) { //obj参数包含的信息
                layer.load(); //上传loading
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {

                    layer.closeAll('loading'); //关闭loading
                    return layer.msg(res.msg, {icon: 7});
                }
                //上传完毕
                if (res.entity != null && res.entity.length > 0) {
                    fileArr.push(res.entity[0])
                    for (var i in res.entity) {
                        var contractInfo = res.entity[i];
                        var arr = contractInfo.split("|");
                        var imgSrc = "";
                        var suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#6-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            }
            ,
            allDone: function (obj) { //当文件全部被提交后，才触发
                layer.closeAll('loading'); //关闭loading
            },
            error: function () {
                layer.closeAll('loading'); //关闭loading
                //上传失败
                layer.msg("上传失败，请稍后再试~", {icon: 7});
            }
        });
        upload.render({
            elem: '#7-upload-more',
            url: basePath + '/contractInfo/uploadAtt/',
            data: {
                types: 7
            },
            multiple: true,
            accept: 'file',
            acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
            before: function (obj) { //obj参数包含的信息
                layer.load(); //上传loading
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.closeAll('loading'); //关闭loading
                    return layer.msg(res.msg, {icon: 7});
                }
                //上传完毕
                if (res.entity != null && res.entity.length > 0) {
                    fileArr.push(res.entity[0])
                    for (var i in res.entity) {
                        var contractInfo = res.entity[i];
                        var arr = contractInfo.split("|");
                        var imgSrc = "";
                        var suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#7-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            }
            ,
            allDone: function (obj) { //当文件全部被提交后，才触发
                layer.closeAll('loading'); //关闭loading
            },
            error: function () {
                layer.closeAll('loading'); //关闭loading
                //上传失败
                layer.msg("上传失败，请稍后再试~", {icon: 7});
            }
        });
        upload.render({
            elem: '#8-upload-more',
            url: basePath + '/contractInfo/uploadAtt/',
            data: {
                types: 8
            },
            multiple: true,
            accept: 'file',
            acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf',
            before: function (obj) { //obj参数包含的信息
                layer.load(); //上传loading
            },
            done: function (res) {
                //如果上传失败
                if (res.code > 0) {
                    layer.closeAll('loading'); //关闭loading
                    return layer.msg(res.msg, {icon: 7});
                }
                //上传完毕
                if (res.entity != null && res.entity.length > 0) {
                    fileArr.push(res.entity[0])
                    for (var i in res.entity) {
                        var contractInfo = res.entity[i];
                        var arr = contractInfo.split("|");
                        var imgSrc = "";
                        var suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#8-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            }
            ,
            allDone: function (obj) { //当文件全部被提交后，才触发
                layer.closeAll('loading'); //关闭loading
            },
            error: function () {
                layer.closeAll('loading'); //关闭loading
                //上传失败
                layer.msg("上传失败，请稍后再试~", {icon: 7});
            }
        });
    });

    //删除文件
    function del(index) {
        layui.$("#fileAtt_" + index).remove();
        layui.$("#upload_img_" + index).remove();
        fileArr.map((el, idx) => {
            if (el.split('|')[2] == index) {
                fileArr.splice(idx, 1)
            }
        })
        console.log(fileArr)
    }

    //根据url查看文件
    function showImg(url) {
        var openWin = window.open(url, '', 'left=410,height=768, width=1024, top=200,  toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
    }

    /*核心*/
    new Vue({
        el: '#app',
        data() {
            return {
                auditMsg: '',
                id: '',
                name: '',
                options: [],
                info: {
                    proName: '',//项目名称
                    proCode: '',//项目编码
                    staffName: '',//营销经理
                    date: '',//当前日期
                    compName: '',//所属公司
                    proFormat: '',//项目业态
                    sgCityName: '',//项目地点
                    pubIncome: '',//一般公共预算收入
                    isInStore: '',//入库情况
                    pppPercent: '',//年度全部PPP项目已占一般公共预算支出比例
                    omYears: '',//运营周期
                    buildYears: '',//建设周期
                    workYears: '',//合作周期
                    sumAmount: '',//总投资额
                    fromChannel: '',//项目渠道
                    govAccess: '',//政府评审阶段
                    proRemarks: '',//项目简介
                    //回报机制
                    downRate: '',//工程费用下浮率
                    profitRate: '',//合理利润率
                    investBackRate: '',//投资回报率
                    discountRate: '',//折现率
                    finRate: '',//建设期融资利率
                    finBackRate: '',//融资回报率
                    capitalBackRate: '',//资本金回报率
                    capitalPercent: '',//资本金比例
                    capitalFund: '',//资本金数额
                    stockFund: '',//我方股权出资金额
                    stockPercent: '',//我方股权比例
                    //项目风险
                    proMerit: '',//项目优点
                    proOthers: '',//其他说明

                    backMech: '',//回报机制复选框
                },
                //项目类型
                projectType: [{value: '1', label: 'PPP项目'}, {value: '2', label: 'ETC项目'},],
                //入库情况
                storageSituation: [],
                unitRole: [],//单位作用
                //项目业态
                projectFormat: [{value: '1', label: '生态建设和环境保护'}, {value: '2', label: '城镇综合开发'},
                    {value: '3', label: '教育'}, {value: '4', label: '水利建设'}, {value: '5', label: '医疗卫生'},
                    {value: '6', label: '政府基础设施'}, {value: '7', label: '其他'}],
                projectChannel: [],//项目渠道
                cooperationType: [],//合作类型
                coopInfoList: [],//合作单位
                //业主单位
                ownerUnit: [{value: '1', label: '业主单位1'}, {value: '2', label: '业主单位2'},],
                // 是否追踪
                traceOptions: [
                    {label: '继续跟踪', value: 1},
                    {label: '停止跟踪', value: 2}
                ],
                summaryCoops: [],// sgCoopId 合作单位 coopEffect 单位作用  cooperationType 类型   合作单位
                itemName: [{name: '子项名称1'},],
                investmentData: [
                    {name: '合作周期', list: [0], total: 0,},
                    {name: '建设周期', list: [0], total: 0,},
                    {name: '运营周期', list: [0], total: 0,},
                    {name: '1.建安工程费用', list: [0], total: 0,},
                    {name: '2.设备购置费用', list: [0], total: 0,},
                    {name: '3.工程建设其他', list: [0], total: 0,},
                    {name: '3.1征地拆迁费', list: [0], total: 0,},
                    {name: '4.预备费', list: [0], total: 0,},
                    {name: '5.建设期利息', list: [0], total: 0,},
                    {name: '合计', list: [0], total: 0,}],
                riskTable: [],   //项目风险点 riskDesc:风险描述 riskLevel:等级 solveWay:处理策略 latestProgress:最新进展
                riskLevel: [],//风险等级列表
                standardTable: [],//底线标准情况 name:标准名称 value:标准值 schedule:当前进度  conclusion:结论

                plotInfo: {//立项策划信息  optRemark  优化方案 csResult 测算结果 plotTableDatas 测算边界表格
                    optRemark: '',
                    csResult: '',
                    plotTableDatas: [],// csBound 测算边界  nowIndex 目前指标 optimization 优化情况
                },
                //是否满足底线标准，baseLineFlag，0-不满足，1-满足
            }
        },
        created() {
            let that = this;
            that.id = "${id}";
            that.querySetupDetail();
        },
        mounted() {

        },
        methods: {
            querySetupDetail() {
                let that = this;
                $.ajax({
                    type: 'post',
                    url: basePath + '/setupPro/querySetupDetail',  //请求数据接口
                    data: {id: that.id},
                    success: function (result) {
                        that.riskLevel = result.entity.riskLevel || [];//风险等级
                        that.riskSolveWay = result.entity.riskSolveWay || [];//处理策略
                        that.riskStatus = result.entity.riskStatus || [];//风险状态
                        that.storageSituation = result.entity.storageSituation || [];//入库情况
                        that.projectChannel = result.entity.projectChannel || [];//项目渠道
                        that.unitRole = result.entity.coopEffect || [];//项目渠道
                        that.cooperationType = result.entity.cooperationType || [];//合作类型
                        that.info = result.entity.info;//详细信息
                        that.riskTable = result.entity.riskTable || [];//项目风险
                        if (result.entity.investmentInfoVos && result.entity.investmentInfoVos.length > 0) {
                            that.investmentData = result.entity.investmentInfoVos//项目风险
                            that.itemName = result.entity.itemName;//项目投资构成
                        }
                        that.standardTable = result.entity.standardTable || [];//底线标准情况
                        that.coopInfoList = result.entity.coopInfoList || [];//合作单位
                        that.summaryCoops = result.entity.summaryCoops || [];//项目合作方
                        //立项策划信息
                        that.plotInfo.optRemark = result.entity.plotInfo ? result.entity.plotInfo.optRemark || '' : '';//优化方案
                        that.plotInfo.csResult = result.entity.plotInfo ? result.entity.plotInfo.csResult || '' : '';//测算结果
                        that.plotInfo.plotTableDatas = result.entity.plotInfo ? result.entity.plotInfo.plotTableDatas || [] : [];//测算边界表格
                        if (fileArr.length == 0) {
                            that.showFile(result.entity.fileAtt);
                        }
                    }
                });
            },
//展示文件
            showFile(fileList) {
                if (fileList.length > 0) {
                    fileArr = fileList;
                    for (let i in fileList) {
                        let contractInfo = fileList[i];
                        let arr = contractInfo.split("|");
                        let imgSrc = "";
                        let suffix = arr[1].substring(arr[1].lastIndexOf(".") + 1, arr[1].length);
                        if (suffix == 'jpg' || suffix == 'png') {
                            imgSrc = "${fileHttpPre}/" + arr[3];
                        } else {
                            imgSrc = "${ctx}/resources/images/" + suffix + ".jpg";
                        }
                        $('#' + arr[0] + '-upload-more-list')
                            .append('<div class="layui-upload-img-div" id="upload_img_' + arr[2] + '"><img src="' + imgSrc + '" title="'
                                + arr[1] + '" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\'' + "${fileHttpPre}"
                                + arr[3] + '\');">查看</a><a href="javascript:void(0)" onclick="del(\''
                                + arr[2] + '\')";>删除</a></div><p>' + arr[1] + '</p><input type="hidden" value="'
                                + contractInfo + '" id="fileAtt_' + arr[2] + '" name="fileAtts" ></input></div> ');
                    }
                }
            },
            error(text) {
                this.$message({
                    message: text,
                    type: 'warning'
                });
            },
            //添加合作单位
            addSummaryCoops() {
                console.log(111)
                let obj = {
                    sgCoopId: '',
                    coopEffect: '',
                    cooperationType: ''
                }
                this.summaryCoops.push(obj);
            },
            //删除合作单位
            delSummaryCoops(index) {
                this.summaryCoops.splice(index, 1)
            },

            //添加风险点
            addRiskTable() {
                let obj = {riskDesc: '', riskLevel: '', solveWay: '', latestProgress: ''};
                this.riskTable.push(obj);
            },
            //删除风险点
            delRiskTable(index) {
                this.riskTable.splice(index, 1)
            },
            //添加其他测算边界条件
            addPlotInfo() {
                // csBound 测算边界  nowIndex 目前指标 optimization 优化情况
                let obj = {csBound: '', nowIndex: '', optimization: '',};
                this.plotInfo.plotTableDatas.push(obj);
            },
            //删除其他测算边界条件
            delRiskTable(index) {
                this.plotInfo.plotTableDatas.splice(index, 1)
            },

            //删除子项
            delInvestmentTop(index) {
                this.itemName.splice(index, 1);
                this.investmentData.map(el => {
                    el.list.splice(index, 1);
                })
                this.investmentTotal();
            },
            delInvestmentLeft(index) {
                this.investmentData.splice(index, 1);
                this.investmentTotal();
            },
            addInvestment() {
                if (this.itemName.length < 6) {
                    this.itemName.push({name: ''});
                    this.investmentData.map(el => {
                        el.list.push(0);
                    })
                }
            },
            //合计 计算数字
            investmentTotal() {
                console.log(this.investmentData);
                //计算每一列的相加
                let arr1 = [];
                this.investmentData.map((el, idx) => {
                    if (el.name != '合计' && idx > 2) {
                        el.list.map((el1, index) => {
                            if (!arr1[index]) {
                                arr1[index] = 0;
                                arr1[index] = arr1[index] + Number(el1)
                            } else {
                                arr1[index] = arr1[index] + Number(el1)
                            }
                        })
                    }
                    if (el.name == '合计') {
                        el.list = arr1
                    }
                })
                let sum = 0;
                // 计算每一行的总和
                this.investmentData.map((el, idx) => {
                    let num = 0;
                    el.list.map(el1 => {
                        num += Number(el1) ? Number(el1) : 0
                    })
                    el.total = num ? num : 0;
                    if (el.name != '合计' && idx > 2) {
                        sum += el.total;
                    } else {
                        el.total = sum
                    }
                })
                console.log(arr1);
            },
            addInvestmentList(e) {
                for (let x in this.investmentData) {
                    if (this.investmentData[x].name == e.name) {
                        console.log(this.investmentData[x].name)
                        let obj = {
                            name: '',
                            list: [],
                            total: 0,
                            isAdd: true,
                        }

                        this.itemName.map(el => {
                            let num = 0
                            obj.list.push(num)
                        })
                        this.investmentData.splice(Number(x) + 1, 0, obj)
                    }
                }
            },
            getArrDifference(arr1, arr2) {
                return arr1.concat(arr2).filter(function (v, i, arr) {
                    return arr.indexOf(v) === arr.lastIndexOf(v);
                });
            },
            //保存
            save(type) {
                let that = this;
                console.log(that.info.isInStore);
                if (that.info.isInStore == '') return that.error('请选择入库情况');
                if (that.info.omYears == '') return that.error('请输入运营周期');
                if (that.info.buildYears == '') return that.error('请输入建设周期');
                if (that.info.workYears == '') return that.error('请输入合作周期');
                if (that.info.sumAmount == '') return that.error('请输入总投资额');
                if (that.info.fromChannel == '') return that.error('请选择项目渠道');
                if (that.info.govAccess == '') return that.error('请选择政府评审阶段');
                if (that.info.proRemarks == '') return that.error('请输入项目简介');
                if (that.summaryCoops.length == 0) return that.error('请添加项目合作方');
                for (let i = 0; i < that.summaryCoops; i++) {
                    if (that.summaryCoops[i].sgCoopId == '') return that.error('请选择项目合作方-合作单位');
                    if (that.summaryCoops[i].coopEffect == '') return that.error('请选择项目合作方-单位作用');
                    if (that.summaryCoops[i].cooperationType == '') return that.error('请选择项目合作方-合作类型');
                }
                if (that.info.downRate == '') return that.error('请输入工程费用下浮率');
                if (that.info.profitRate == '') return that.error('请输入合理利润率');
                if (that.info.investBackRate == '') return that.error('请输入投资回报率');
                if (that.info.discountRate == '') return that.error('请输入折现率');
                if (that.info.finRate == '') return that.error('请输入建设期融资利率');
                if (that.info.finBackRate == '') return that.error('请输入融资回报率');
                if (that.info.capitalBackRate == '') return that.error('请输入资本金回报率');
                if (that.info.capitalPercent == '') return that.error('请输入资本金比例');
                if (that.info.capitalFund == '') return that.error('请输入资本金数额');
                if (that.info.stockFund == '') return that.error('请输入我方股权出资金额');
                if (that.info.stockPercent == '') return that.error('请输入我方股权比例');
                if (that.plotInfo.optRemark == '') return that.error('请输入立项策划信息-优化方案');
                if (that.plotInfo.csResult == '') return that.error('请输入立项策划信息-初步测算结果');
                if (that.plotInfo.plotTableDatas.length == 0) return that.error('请添加项目合作方');
                for (let i = 0; i < that.plotInfo.summaryCoops; i++) {
                    if (that.plotInfo.summaryCoops[i].csBound == '') return that.error('请输入立项策划信息-测算边界');
                    if (that.plotInfo.summaryCoops[i].nowIndex == '') return that.error('请输入立项策划信息-目前指标');
                    if (that.plotInfo.summaryCoops[i].optimization == '') return that.error('请输入立项策划信息-优化情况');
                }
                let arr1 = ["4", "6", "7", "8"];
                let idsArr = [];
                fileArr.map((item, index) => {
                    idsArr.push(item.split('|')[0]);
                    idsArr = [...new Set(idsArr)]
                });
                let arr3 = that.getArrDifference(arr1, idsArr);
                if (arr3.length > 0) {
                    if (arr3[0] == 4) return that.error('请上传立项报告');
                    if (arr3[0] == 6) return that.error('请上传项目物有所值评估');
                    if (arr3[0] == 7) return that.error('请上传项目财政承受可行性评估');
                    if (arr3[0] == 8) return that.error('请上传项目实施方案');
                }
                let obj = {
                    "info": that.info,//项目基础信息
                    "itemName": that.itemName,//项目子项信息
                    "riskTable": that.riskTable,//投资构成信息
                    "investmentInfoVos": that.investmentData,//项目风险信息
                    //"coopInfoList": that.coopInfoList,//合作单位
                    "summaryCoops": that.summaryCoops,//项目合作方
                    "plotInfo": that.plotInfo,//立项策划信息
                    "fileAtt": fileArr,//附件信息
                };
                obj.riskTable.map(el => {
                    el.addTime = null
                })
                obj.summaryCoops.map(el => {
                    el.addTime = null
                })
                console.log(obj)
                let str = JSON.stringify(obj).replace(/\"/g, '\\"');
                $.ajax({
                    type: 'post',
                    url: basePath + '/setupPro/auditProcess',  //请求数据接口
                    data: {
                        id: that.info.id,  //info里面获取
                        processId: that.info.processId,  //info里面获取
                        status: type,  //0=驳回，1=通过
                        auditMsg: that.auditMsg  //填写的审批信息
                    },
                    success: function (result) {
                        if (result.success) {
                            that.$message({
                                message: '保存成功',
                                type: 'success'
                            });
                            that.querySetupDetail();
                        } else {
                            that.$message.error('保存失败');
                            that.querySetupDetail();
                        }
                    }
                });
            }
        }
    })
</script>
</body>
</html>

